From: Richard M. Stallman Date: Thu, 24 May 2007 22:12:25 +0000 (+0000) Subject: (flyspell-correct-word-before-point): Don't let opoint be nil. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~18855^2~2191 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=913a8cda3525fdd39156ae203684ed9920bfc149;p=emacs.git (flyspell-correct-word-before-point): Don't let opoint be nil. (flyspell-emacs-popup): Explicit error if no dialogs. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b1763abd2ef..d06e66e38d3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2007-05-24 Richard Stallman + + * textmodes/flyspell.el (flyspell-correct-word-before-point): + Don't let opoint be nil. + (flyspell-emacs-popup): Explicit error if no dialogs. + 2007-05-23 Eli Zaretskii * tar-mode.el (tar-file-name-handler): New function. diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index a509fdf7f6c..e02fec1362f 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -2025,6 +2025,7 @@ If OPOINT is non-nil, restore point there after adjusting it for replacement." (error "Pop-up menus do not work on this terminal")) ;; use the correct dictionary (flyspell-accept-buffer-local-defs) + (or opoint (setq opoint (point-marker))) (let ((cursor-location (point)) (word (flyspell-get-word nil))) (if (consp word) @@ -2133,6 +2134,8 @@ If OPOINT is non-nil, restore point there after adjusting it for replacement." ;;*---------------------------------------------------------------------*/ (defun flyspell-emacs-popup (event poss word) "The Emacs popup menu." + (unless window-system + (error "This command requires pop-up dialogs")) (if (not event) (let* ((mouse-pos (mouse-position)) (mouse-pos (if (nth 1 mouse-pos)